<template>
  <div>
    <ul class="ultra">
      <li>
        <div class="innerUltra">
          <div class="hot">
            <span>影院热映</span
            ><router-link to="/more" class="link"
              >更多 ></router-link
            >
          </div>
          <ul class="boll">
            <li class="roll" v-for="item in movie" :key="item.id">
              <img :src="src" alt="" />
              <div class="word">{{ item.title }}</div>
              <!-- <div class="star">
              <img src="../../assets/images/rating_star_small_on.png" alt="" />
            </div> -->
            </li>
          </ul>
        </div>
        <div class="middle">
          <div class="innerbox">小S放飞自我</div>
        </div>
      </li>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
import movie from '@/assets/data/6_month_movie.json' // 引入

export default {
  data () {
    return {
      movie: movie.subjects,
      src: require('../../assets/images/movie.jpg')
    }
  }
}
</script>

<style scoped lang="scss">
* {
  box-sizing: border-box;
}
.hot {
  width: 750px;
  height: 128px;
  line-height: 128px;
  font-size: 35px;
  padding-left: 20px;
  padding-right: 20px;
  // margin-top: 100px;
  float: left;
}
.hot span:nth-of-type(2) {
  float: right;
  padding-right: 20px;
  font-size: 30px;
  color: green;
}
.boll {
  width: 750px;
  height: 380px;
  margin-top: 128px;
  overflow-x: auto;
  white-space: nowrap; // 不换行
}

.roll {
  width: 200px;
  height: 369px;
  display: inline-block; // 使用 inline-block
  //  而不是 block，以便元素可以并排显示
  font-size: 200px;
  margin-right: 10px;
  box-shadow: 0px 0px 15px grey;
  overflow: hidden;
  img {
    width: 200px;
    height: 277px;
  }
}
// ul:nth-of-type(1) li:nth-of-type(2) {
//   width: 750px;
//   height: 380px;
//   background-color: skyblue;
//   margin-top: 52px;
// }
.link {
  float: right;
}

.ultra {
  height: 100%;
  margin-top: 23px;
  overflow: auto;
}
.middle {
  width: 750px;
  height: 343px;
  margin-top: 32px;
  background: url("../../assets/images/1111111.jpg");
  background-size: 750px 219px;
  overflow: hidden;
  .innerbox {
    width: 750px;
    height: 122px;
    background-color: white;
    margin-top: 222px;
    text-align: center;
    line-height: 122px;
    font-size: 32px;
  }
}

.word {
  font-size: 25px;
  text-align: center;
}
.star {
  width: 192px;
  height: 27px;
  border: 1px solid red;
  img {
    width: 20px;
    height: 20px;
  }
}
.innerUltra{
  width: 750px;
  height: 510px;
  margin-top: 108px;
}
</style>
